home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_35660.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  55 lines

  1. -- card: 35660 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0007
  11. -- rect: left=30 top=78 right=296 bottom=478
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 4
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: 
  20.  
  21.  
  22. -- part contents for background part 4
  23. ----- text -----
  24. File 2 of 2:
  25.  
  26. -- part contents for background part 7
  27. ----- text -----
  28. 104
  29.  
  30. -- part contents for card part 1
  31. ----- text -----
  32. /*
  33. *   FILE:    contains.char.c
  34. *   AUTHOR:  R.G.
  35. *   CREATED: June 22, 1990
  36. *   
  37. *   Definition of contains_char().
  38. */
  39.  
  40. /******************************************************************
  41. *   Recursive function to look for ocurrence of a character in
  42. *   a character string (array)
  43. ******************************************************************/
  44. int   contains_char(char *string,char c)
  45. {
  46.     /* recall that array name points to first element of array: */
  47.     if (*string == '\0')    /* end of string encountered */
  48.         return 0;           /* return false */
  49.     else if (*string == c)  /* character found */
  50.         return 1;           /* return true */
  51.     else
  52.         return contains_char(string+1,c);  /* look at rest of string */
  53. }
  54.  
  55.